﻿<UserControl x:Class="BillsManager.Views.ShellView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Caliburn="http://www.caliburnproject.org"
             xmlns:Controls="clr-namespace:BillsManager.Views.Controls"
             xmlns:ViewModels="clr-namespace:BillsManager.ViewModels;assembly=BillsManager.ViewModels"
             xmlns:Views="clr-namespace:BillsManager.Views;assembly=BillsManager.Views"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Loc="clr-namespace:BillsManager.Localization;assembly=BillsManager.Localization"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             Caliburn:Bind.AtDesignTime="True"
             d:DataContext="{d:DesignInstance Type=ViewModels:ShellViewModel,
                                              IsDesignTimeCreatable=True}"
             d:DesignHeight="200"
             d:DesignWidth="800"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="Dictionaries\Styles.xaml" />-->
        <ResourceDictionary Source="Themes\Themes.xaml" />
    </UserControl.Resources>

    <UserControl.Background>
        <Binding Mode="OneTime" Source="{StaticResource View.Background}" />
    </UserControl.Background>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.Region.Spacing.Small}" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Menu HorizontalAlignment="Stretch" VerticalAlignment="Center">

            <!--<MenuItem Command="{Binding DBViewModel.ConnectCommand, Mode=OneWay}" ToolTip="{Loc:Translate Connect}">
                    <MenuItem.Icon>
                        <Controls:AutoGreyableImage Source="Images/db/db-connect-24.png" />
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem Command="{Binding DBViewModel.DisconnectCommand, Mode=OneWay}" ToolTip="{Loc:Translate Disconnect}">
                    <MenuItem.Icon>
                        <Controls:AutoGreyableImage Source="Images/db/db-disconnect-24.png" />
                    </MenuItem.Icon>
                </MenuItem>

                <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />-->

            <MenuItem Command="{Binding DBViewModel.SaveCommand, Mode=OneWay}" ToolTip="{Loc:Translate Save}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/db/save-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />

            <MenuItem Command="{Binding DBViewModel.SuppliersViewModel.AddNewSupplierCommand, Mode=OneWay}" ToolTip="{Loc:Translate AddSupplier}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/suppliers/supplier-add-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.SuppliersViewModel.EditSupplierCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.SuppliersViewModel.SelectedSupplierViewModel}"
                      ToolTip="{Loc:Translate EditSupplier}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/suppliers/supplier-edit-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.SuppliersViewModel.DeleteSupplierCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.SuppliersViewModel.SelectedSupplierViewModel}"
                      ToolTip="{Loc:Translate DeleteSupplier}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/suppliers/supplier-delete-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.SuppliersViewModel.ShowSupplierDetailsCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.SuppliersViewModel.SelectedSupplierViewModel}"
                      ToolTip="{Loc:Translate SupplierDetails}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/suppliers/supplier-details-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />

            <MenuItem Command="{Binding DBViewModel.BillsViewModel.AddNewBillCommand, Mode=OneWay}" ToolTip="{Loc:Translate AddBill}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/bills/bill-add-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.BillsViewModel.EditBillCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.BillsViewModel.SelectedBillViewModel}"
                      ToolTip="{Loc:Translate EditBill}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/bills/bill-edit-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.BillsViewModel.DeleteBillCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.BillsViewModel.SelectedBillViewModel}"
                      ToolTip="{Loc:Translate DeleteBill}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/bills/bill-delete-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.BillsViewModel.PayBillCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.BillsViewModel.SelectedBillViewModel}"
                      ToolTip="{Loc:Translate PayBill}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/bills/bill-pay-cash-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.BillsViewModel.ShowBillDetailsCommand,
                                        Mode=OneWay}"
                      CommandParameter="{Binding DBViewModel.BillsViewModel.SelectedBillViewModel}"
                      ToolTip="{Loc:Translate BillDetails}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/bills/bill-info-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />

            <MenuItem Command="{Binding DBViewModel.ToggleShowFiltersCommand,
                                        Mode=OneWay}"
                      IsChecked="{Binding DBViewModel.ShowFilters,
                                          Mode=OneWay}"
                      ToolTip="{Loc:Translate Find}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/filters/search-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />

            <MenuItem Command="{Binding ShowSettingsCommand, Mode=OneWay}" ToolTip="{Loc:Translate Settings}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/tools/settings/settings-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding DBViewModel.ShowReportCenterCommand, Mode=OneWay}" ToolTip="{Loc:Translate PrintReport}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/tools/report/print-green-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding ShowBackupCenterCommand, Mode=OneWay}" ToolTip="{Loc:Translate BackupCenter}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/tools/backup/backup-center-24.png" />
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Command="{Binding ShowSendFeedbackCommand, Mode=OneWay}" ToolTip="{Loc:Translate SendFeedback}">
                <MenuItem.Icon>
                    <Controls:AutoGreyableImage Source="Images/tools/feedback/feedback-24.png" />
                </MenuItem.Icon>
            </MenuItem>

        </Menu>

        <ContentControl x:Name="DBViewModel" Grid.Row="2" />

        <ContentControl x:Name="StatusBarViewModel" Grid.Row="3" />

    </Grid>

</UserControl>